
package br.com.aeternu.controleatendimento;

import java.awt.AWTException;
import java.awt.Image;
import java.awt.SystemTray;
import java.awt.TrayIcon;
import br.com.aeternu.controleatendimento.common.ifc.IfcMensagemUsuario;
import br.com.aeternu.controleatendimento.util.IconUtil;

public class SysTray
{

   public SysTray() throws AWTException
   {
      SysTrayMenu sysTrayMenu = new SysTrayMenu();

      Image image = IconUtil.getImageFromLocal(IconUtil.SISTEMA_32X32);

      TrayIcon trayIcon = new TrayIcon(image, IfcMensagemUsuario.INFO_SOBRE, sysTrayMenu);
      trayIcon.setImageAutoSize(true);
      trayIcon.setPopupMenu(sysTrayMenu);

      SystemTray systemTray = SystemTray.getSystemTray();
      systemTray.add(trayIcon);
   }

}
